<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增易达电表数据')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ydmeterdata-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备ID：</label>
                <div class="col-sm-8">
                    <input name="deviceId" class="form-control" type="text" placeholder="请输入设备ID" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">采集时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="collectTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">直流电流：</label>
                <div class="col-sm-8">
                    <input name="dcCurrent" class="form-control" type="number" step="0.01" placeholder="请输入直流电流(A)">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">直流电压：</label>
                <div class="col-sm-8">
                    <input name="dcVoltage" class="form-control" type="number" step="0.01" placeholder="请输入直流电压(V)">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">直流炉阻：</label>
                <div class="col-sm-8">
                    <input name="dcResistance" class="form-control" type="number" step="0.01" placeholder="请输入直流炉阻(Ω)">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">有功功率：</label>
                <div class="col-sm-8">
                    <input name="activePower" class="form-control" type="number" step="0.01" placeholder="请输入有功功率(kW)">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">炉号：</label>
                <div class="col-sm-8">
                    <input name="furnaceNo" class="form-control" type="number" placeholder="请输入炉号">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单炉电量：</label>
                <div class="col-sm-8">
                    <input name="furnaceEnergy" class="form-control" type="number" step="0.01" placeholder="请输入单炉电量(kWh)">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" id="status1" name="status" value="1" checked>
                        <label for="status1">正常</label>
                        <input type="radio" id="status0" name="status" value="0">
                        <label for="status0">异常</label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control" placeholder="请输入备注"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/ydmeterdata";
        $("#form-ydmeterdata-add").validate({
            focusCleanup: true
        });
        
        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-ydmeterdata-add').serialize());
            }
        }
        
        $(function() {
            $("input[name='collectTime']").datetimepicker({
                format: "yyyy-mm-dd hh:ii:ss",
                minView: "month",
                autoclose: true
            });
        });
    </script>
</body>
</html>